package com.ruoyi.web.course.domain;

import com.baomidou.mybatisplus.annotation.TableField;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

/**
 * 章节对象 train_course_chapter
 *
 * @author 范书铭
 * @date 2024-10-10
 */
@ApiModel(value =  "章节",description = "")
@TableName(resultMap = "com.ruoyi.web.course.mapper.TrainCourseChapterMapper.TrainCourseChapterResult")
@Data
@EqualsAndHashCode(callSuper = true)
public class TrainCourseChapter extends BaseEntity{
        private static final long serialVersionUID = 1L;

        /**  */
        @TableId(value = "id",type = IdType.AUTO)
        private Long id;

        /** 标题 */
        @ApiModelProperty(name = "标题",notes = "")
        @Excel(name = "标题")
        private String title;

        /** 作者 */
        @ApiModelProperty(name = "作者",notes = "")
        @Excel(name = "作者")
        private String author;

        /** 视频ID */
        @ApiModelProperty(name = "视频ID",notes = "")
        @Excel(name = "视频ID")
        private Long videoId;

        /** 讲义 */
        @ApiModelProperty(name = "讲义",notes = "")
        @Excel(name = "讲义")
        private String handout;

        /** 所属课程ID */
        @ApiModelProperty(name = "所属课程ID",notes = "")
        @Excel(name = "所属课程ID")
        private Long courseId;

        @ApiModelProperty(name = "视频对象",notes = "")
        @TableField(exist = false)
        private TrainVideo trainVideo;

        @Override
        public String toString() {
                return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
                        .append("id", getId())
                        .append("title", getTitle())
                        .append("author", getAuthor())
                        .append("videoId", getVideoId())
                        .append("handout", getHandout())
                        .append("createBy", getCreateBy())
                        .append("createTime", getCreateTime())
                        .append("updateBy", getUpdateBy())
                        .append("updateTime", getUpdateTime())
                        .append("remark", getRemark())
                        .append("courseId", getCourseId())
                        .toString();
        }
}